package com.example.zqm.git72.Service;

import com.example.zqm.git72.JavaBean.Club;
import com.example.zqm.git72.JavaBean.Collection;
import com.example.zqm.git72.JavaBean.Collectiontrain;
import com.example.zqm.git72.JavaBean.Train;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by Administrator on 2017/4/10.
 */

public interface TrainService {
 @GET("workout/api.php/lists/mod/train ")
    Call<List<Train>>getList();
    @GET("workout/api.php/get/mod/train ")
    Call<Train>getTrainById(
            @Query("id") String id
    );
    @GET("workout/api.php/search/mod/train/search_key/name/{name} ")
    Call<List<Train>>bysearch(
            @Query("name") String name
    );

    @GET("workout/api.php/isExits/mod/trainfavor/train_id/{train_id}/user_id/{user_id}")
   Call<String>ifcollect(
           @Query("ctrainid") String ctrainid,
           @Query("user_id")  String user_id,
           @Query("flag") int fag
   );
    @GET("workout/api.php/create/mod/trainfavor/train_id/{train_id}/user_id/{user_id}")
    Call<Integer>iscollect(
            @Query("train_id") String train_id,
            @Query("user_id")  String user_id
    );
    @GET("workout/api.php/delete/mod/trainfavor/train_id/{train_id/user_id/{user_id}")
    Call<Integer>decollect(
            @Query("train_id") String train_id,
            @Query("user_id")  String user_id
    );
    @GET("workout/api.php/lists/mod/trainfavor/user_id/{user_id}")
    Call<List<Collectiontrain>>cotrain(
            @Query("user_id")  String user_id
    );
    @GET("workout/api.php/create/mod/signtrain/participantname/{participantname}/train_id/{train_id}/participanttel/{participanttel}/adultnum/1/studentnum/1/paytype/1/pay/{pay}/userid/{userid}")
    Call<Integer> signtrain(
            @Query("participantname") String participantname,
            @Query("train_id") String train_id,
            @Query("participanttel") String participanttel,
            @Query("pay") String pay,
            @Query("userid") String userid
    );
}
